<?php

namespace fastflow\driver\think;


use think\Db;
use fastflow\driver\interfaces\processTemplate;

class process implements processTemplate
{

    
    public static function getProcess($param)
    {
        if (isset($param)) {
            $process = Db::table('__FASTFLOW_PROCESS__')->where($param)->select();
            if (count($process) == 0) {
                return false;
            }
            return $process;
        }
        return false;
    }

    
    public static function setProcess($param)
    {
        if (isset($param)) {
            $count = Db::table('__FASTFLOW_PROCESS__')->update($param);
            return $count;
        }
        return false;
    }

    
    public static function addProcess($param)
    {
        if (isset($param)) {
            $count = Db::table('__FASTFLOW_PROCESS__')->insert($param);
            return $count;
        }
        return false;
    }

    
    public static function delProcess($param){
        if (isset($param)) {
            $count = Db::table('__FASTFLOW_PROCESS__')->where($param)->delete();
            return $count;
        }
        return false;
    }
}